<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html >
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>科目维护</title>
<%@include file="/view/common/js-css.jsp" %>
</head>
<body>
	<div id="frameWrapper" class="frameWrapper">
		<div class="titlebar">
			<p>
				当前位置：科目管理<span>/</span>科目维护
			</p>
		</div>
		<div id="table-wrap">
			<table border="1">
				<thead>
					<tr>
						<th><input type="checkbox">全选</th>
						<th>编号</th>
						<th>科目名</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
				<c:forEach items="${paging.list }" var="subjectList">
					<tr>
					
						<td><input type="checkbox">选择</td>
						<td>${subjectList.subject_id }</td>
						<td>${subjectList.subject_name }</td>
						<td class="do">
						<a href="${pageContext.request.contextPath }/SubjectServlet?command=delete&subjectId=${subjectList.subject_id}" class="btn btn-del"><i class="fa fa-trash"></i>删除</a> 
						<a href="${pageContext.request.contextPath }/SubjectServlet?command=initUpdate&subjectId=${subjectList.subject_id}" class="btn btn-update"><i class="fa fa-pencil"></i>修改</a></td>
				
					</tr>
					</c:forEach>
				</tbody>
				
			</table>
			<div id="paging">
				<a class="btn btn-getionfo" href="${pageContext.request.contextPath }/SubjectServlet?command=query&currentPage=1" target="iframe">首页</a>
				<a class="btn btn-getionfo" href="${pageContext.request.contextPath }/SubjectServlet?command=query&currentPage=${paging.currentPage-1<1?1:paging.currentPage-1 }" target="iframe">上一页</a>
			&nbsp;&nbsp;&nbsp;&nbsp;
			共<span>${paging.pageTotal } </span>页
			&nbsp;&nbsp;&nbsp;&nbsp;
			当前第<span>${paging.currentPage }</span>页
			&nbsp;&nbsp;&nbsp;&nbsp;
			<a class="btn btn-getionfo" href="${pageContext.request.contextPath }/SubjectServlet?command=query&currentPage=${paging.currentPage+1>paging.pageTotal?paging.pageTotal:paging.currentPage+1 }" target="iframe">下一页</a>
			<a class="btn btn-getionfo" href="${pageContext.request.contextPath }/SubjectServlet?command=query&currentPage=${paging.pageTotal}" target="iframe">末页</a>
		</div>
	</div>
</body>
</html>